package com.yanchangapp.widget;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.widget.TextView;

import com.yanchangapp.R;


/**
 * Created by apple on 2019-08-06.
 * description:
 */
public class DelayShowDialog extends Dialog {
    private String text;

    public DelayShowDialog(@NonNull Context context) {
        super(context, R.style.loadProgressDialog);
    }

    public DelayShowDialog(@NonNull Context context,String text) {
        super(context, R.style.loadProgressDialog);
        this.text = text;
    }


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setCancelable(false);
        setContentView(R.layout.delay_dialog);
        TextView tv =  findViewById(R.id.tvDes);
        if (!TextUtils.isEmpty(text)){
            if (null != tv){
                tv.setText(text);
            }
        }
    }
}
